package com.ys.service.wallet.eth.erc20;

import com.ys.enu.CurrencyEnum;
import lombok.Data;
import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Service;

@Data
@Slf4j
@Service
@ConfigurationProperties(prefix="wallet.yshb")
public class YshbWalletService extends Erc20WalletService {



    private Integer currency;
    private CurrencyEnum currencyEnum;
    private String server;
    private String withDrawAddressPwd;
    private String withDrawAddress;
    private String depositAddress;

    //eth 数字都是16进制
    public static final int PASS_RADIX = 16;
    public static final double FEE = 0.000000000000021000;
    //eth 单位wei 转成 币
    static final double PASS_VALUE = 1.0E18;

    static final double maxPrice = 0.00000020d;


    @Override
    public String auth() {
        return null;
    }

    @Override
    public String server() {
        return server;
    }

    public String withDrawAddressPwd(){
        return withDrawAddressPwd;
    }

    public Double maxPrice(){
        return maxPrice;
    }
    public double fee(){
        return FEE;
    }

    public void setCurrency(Integer currency) {
        this.currency = currency;
        this.currencyEnum=CurrencyEnum.parseCurrency(currency);
    }

    @Override
    public CurrencyEnum currencyEnum() {
        return this.getCurrencyEnum();
    }

}
